3.47 \(\int e^x x \sin (x) \, dx\)

Optimal. Leaf size=30 \[ \frac{1}{2} e^x x \sin (x)+\frac{1}{2} e^x \cos (x)-\frac{1}{2} e^x x \cos (x) \]

[Out]

(E^x*Cos[x])/2 - (E^x*x*Cos[x])/2 + (E^x*x*Sin[x])/2

________________________________________________________________________________________

Rubi [A]  time = 0.0393673, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.429, Rules used = {4432, 4465, 4433} \[ \frac{1}{2} e^x x \sin (x)+\frac{1}{2} e^x \cos (x)-\frac{1}{2} e^x x \cos (x) \]

Antiderivative was successfully verified.

[In]

Int[E^x*x*Sin[x],x]

[Out]

(E^x*Cos[x])/2 - (E^x*x*Cos[x])/2 + (E^x*x*Sin[x])/2

Rule 4432

Int[(F_)^((c_.)*((a_.) + (b_.)*(x_)))*Sin[(d_.) + (e_.)*(x_)], x_Symbol] :> Simp[(b*c*Log[F]*F^(c*(a + b*x))*S
in[d + e*x])/(e^2 + b^2*c^2*Log[F]^2), x] - Simp[(e*F^(c*(a + b*x))*Cos[d + e*x])/(e^2 + b^2*c^2*Log[F]^2), x]
 /; FreeQ[{F, a, b, c, d, e}, x] && NeQ[e^2 + b^2*c^2*Log[F]^2, 0]

Rule 4465

Int[(F_)^((c_.)*((a_.) + (b_.)*(x_)))*((f_.)*(x_))^(m_.)*Sin[(d_.) + (e_.)*(x_)]^(n_.), x_Symbol] :> Module[{u
 = IntHide[F^(c*(a + b*x))*Sin[d + e*x]^n, x]}, Dist[(f*x)^m, u, x] - Dist[f*m, Int[(f*x)^(m - 1)*u, x], x]] /
; FreeQ[{F, a, b, c, d, e, f}, x] && IGtQ[n, 0] && GtQ[m, 0]

Rule 4433

Int[Cos[(d_.) + (e_.)*(x_)]*(F_)^((c_.)*((a_.) + (b_.)*(x_))), x_Symbol] :> Simp[(b*c*Log[F]*F^(c*(a + b*x))*C
os[d + e*x])/(e^2 + b^2*c^2*Log[F]^2), x] + Simp[(e*F^(c*(a + b*x))*Sin[d + e*x])/(e^2 + b^2*c^2*Log[F]^2), x]
 /; FreeQ[{F, a, b, c, d, e}, x] && NeQ[e^2 + b^2*c^2*Log[F]^2, 0]

Rubi steps

\begin{align*} \int e^x x \sin (x) \, dx &=-\frac{1}{2} e^x x \cos (x)+\frac{1}{2} e^x x \sin (x)-\int \left (-\frac{1}{2} e^x \cos (x)+\frac{1}{2} e^x \sin (x)\right ) \, dx\\ &=-\frac{1}{2} e^x x \cos (x)+\frac{1}{2} e^x x \sin (x)+\frac{1}{2} \int e^x \cos (x) \, dx-\frac{1}{2} \int e^x \sin (x) \, dx\\ &=\frac{1}{2} e^x \cos (x)-\frac{1}{2} e^x x \cos (x)+\frac{1}{2} e^x x \sin (x)\\ \end{align*}

Mathematica [A]  time = 0.0379688, size = 19, normalized size = 0.63 \[ \frac{1}{2} e^x (x \sin (x)-x \cos (x)+\cos (x)) \]

Antiderivative was successfully verified.

[In]

Integrate[E^x*x*Sin[x],x]

[Out]

(E^x*(Cos[x] - x*Cos[x] + x*Sin[x]))/2

________________________________________________________________________________________

Maple [A]  time = 0.007, size = 19, normalized size = 0.6 \begin{align*} \left ( -{\frac{x}{2}}+{\frac{1}{2}} \right ){{\rm e}^{x}}\cos \left ( x \right ) +{\frac{{{\rm e}^{x}}x\sin \left ( x \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(x)*x*sin(x),x)

[Out]

(-1/2*x+1/2)*exp(x)*cos(x)+1/2*exp(x)*x*sin(x)

________________________________________________________________________________________

Maxima [A]  time = 1.02485, size = 23, normalized size = 0.77 \begin{align*} -\frac{1}{2} \,{\left (x - 1\right )} \cos \left (x\right ) e^{x} + \frac{1}{2} \, x e^{x} \sin \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*x*sin(x),x, algorithm="maxima")

[Out]

-1/2*(x - 1)*cos(x)*e^x + 1/2*x*e^x*sin(x)

________________________________________________________________________________________

Fricas [A]  time = 0.455893, size = 59, normalized size = 1.97 \begin{align*} -\frac{1}{2} \,{\left (x - 1\right )} \cos \left (x\right ) e^{x} + \frac{1}{2} \, x e^{x} \sin \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*x*sin(x),x, algorithm="fricas")

[Out]

-1/2*(x - 1)*cos(x)*e^x + 1/2*x*e^x*sin(x)

________________________________________________________________________________________

Sympy [A]  time = 0.889217, size = 27, normalized size = 0.9 \begin{align*} \frac{x e^{x} \sin{\left (x \right )}}{2} - \frac{x e^{x} \cos{\left (x \right )}}{2} + \frac{e^{x} \cos{\left (x \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*x*sin(x),x)

[Out]

x*exp(x)*sin(x)/2 - x*exp(x)*cos(x)/2 + exp(x)*cos(x)/2

________________________________________________________________________________________

Giac [A]  time = 1.10606, size = 22, normalized size = 0.73 \begin{align*} -\frac{1}{2} \,{\left ({\left (x - 1\right )} \cos \left (x\right ) - x \sin \left (x\right )\right )} e^{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*x*sin(x),x, algorithm="giac")

[Out]

-1/2*((x - 1)*cos(x) - x*sin(x))*e^x